<template>
    <div id="MyIndex-Middle-Detail">

        <div v-if="this.$store.state.MyIndex.content.value.length===0">
            <img src="img/My/MyIndex/No.jpg" alt="" id="img">
        </div>
        <div  v-else class="MyIndex-Middle-Detail-Content"  v-for="(v) in this.$store.state.MyIndex.content.value" v-bind:key="v.id">
            <div class="top">
                <img src="img/My/My.png" alt="">
                <p>
                    <span>饕餮</span>
                    <i>11小时·收藏了本文章</i>
                </p>
            </div>
            <div class="content">
                <h2>{{v.title}}</h2>
                <div>
                    <p>
                        <span>爱前端不爱恋爱：</span>{{v.text}}
                    </p>
                </div>
            </div>
            <div class="bottom-bar">
                <p>
                    <span><i class="iconfont icon-xiangshangsanjiaoxing"></i>399</span>
                    <span><i class="iconfont icon-pinglun"></i>9</span>
                </p>
                <i class="iconfont icon-iconfontzhizuobiaozhun0257"></i>
            </div>
        </div>
    </div>
</template>

<script>
    export default {
        name: "MyIndex-Nav"
    }
</script>

<style lang="scss" scoped>
    #MyIndex-Middle-Detail {
        width: 100%;
        background-color: #FFFFFF;
        border-top: 0.05rem solid #ebebeb;


        #img{
            height:6rem;
        }
    }

    .MyIndex-Middle-Detail-Content {
        width: 100%;
        padding: 0 0.16rem;
        border-bottom: 0.1rem solid #d6d6d6;

        .top {
            height: 0.4rem;
            margin-top: 0.15rem;
            display: flex;
            justify-content: flex-start;
            align-items: center;
            margin-bottom: 0.02rem;

            img {
                width: 0.34rem;
                border-radius: 50%;
                margin-right: 0.08rem;
            }

            p {
                display: flex;
                flex-direction: column;
                justify-content: center;
                align-items: flex-start;

                span {
                    font-size: 0.15rem;
                }

                i {
                    font-size: 0.12rem;
                    color: #909090;
                    font-style: normal;
                }
            }
        }

        .content {


            h2 {
                /*height: 0.47rem;*/
                line-height: 0.22rem;
                font-size: 0.16rem;
                color: #000;
                letter-spacing: 0.012rem;
                word-spacing: 0.01rem;
            }

            div {
                width: 100%;
                height: 0.72rem;


                p {
                    line-height: 0.24rem;
                    font-size: 0.15rem;
                    color: #1b1b1b;

                    /*多行文本隐藏*/
                    display: -webkit-box;
                    -webkit-box-orient: vertical;
                    -webkit-line-clamp: 3;
                    overflow: hidden;



                    span{
                        font-size: 0.15rem;
                        line-height: 0.24rem;
                        font-weight: bold;
                        color: #050505;
                    }
                }
            }

            //letter-spacing:字符间的间距
            //word-spacing:单词间距

        }

        .bottom-bar {
            height: 0.34rem;
            width: 100%;
            display: flex;
            justify-content: space-between;
            align-items: center;


            p{

                display: flex;
                justify-content: space-between;
                align-items: center;
            }
            span{
                margin-left: 0.03rem;
                font-size: 0.1rem;
                color: #909090;
                display: block;
                margin-right: 0.3rem;
                display: flex;
                justify-content: space-between;
                align-items: center;
                i{
                    font-size: 0.16rem;
                    color: #777777;
                    display: block;
                    margin-right: 0.04rem;
                }
            }

            i{
                font-size: 0.05rem;
                color: #c8c8c8;
                font-weight: bold;
                display: block;
                margin-right: 0.04rem;
            }
        }
    }
</style>